Communication apparatus, control method for the same and non-transitory computer-readable storage medium

ABSTRACT

The present invention provides a technique that, in the case where a first radio communication unit has acquired device information, and the execution of a service has started, makes it possible to detect the stopping of execution of the service by a second radio communication unit. To achieve this, device information regarding another communication apparatus is acquired via the first radio communication unit, and if a predetermined service is being executed with the other communication apparatus based on the acquired device information, a predetermined signal indicating stopping of the predetermined service is detected via the second radio communication unit that is different from the first radio communication unit. If the predetermined signal is detected, processing for stopping the predetermined service is performed.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a communication apparatus that executesa service with another communication apparatus using radiocommunication, and in particular relates to a communication apparatusthat, in the case where device information has been acquired fromanother communication apparatus using proximity communication, and theexecution of a service over radio communication has started, realizesthe detection of the disappearance of another communication apparatus.

2. Description of the Related Art

Recent years have seen the beginning of the use of proximitycommunication such as NFC (Near Field Communication), IrDA (InfraredData Association), and TransferJet (registered trademark). Users canexchange data between two communication devices by merely performing anoperation such as bringing the communication devices close to each other(e.g., see Japanese Patent Laid-Open No. 2007-221355).

Also, the NFC Forum has standardized a protocol for handover from NFC toa different radio communication system such as Wi-Fi (Wireless Fidelity)or Bluetooth (registered trademark).

Meanwhile, there is a communication protocol for searching for servicesprovided by other communication devices and notifying othercommunication devices of self-provided services (service discoveryprotocol). Some examples of this include the Simple Service DiscoveryProtocol (SSDP) and Multicast Domain Name Service (MDNS). Generally,when a service discovery protocol is used over Wi-Fi, several seconds toten or more seconds is required to discover counterpart devices, and theusers need to wait this amount of time between bringing theircommunication devices close together and finding out whether or notservices can be executed, which has the possibility of significantlyimpairing the usability of the system. To address this, there is amethod of using proximity communication to acquire device informationregarding services provided by communication apparatuses.

However, in the aforementioned method, in the case where deviceinformation has been acquired via proximity communication, and theexecution of a service over radio communication has started, it is notpossible to detect the disappearance of the counterpart communicationapparatus. For this reason, there is a problem in that it is notpossible to end the service execution at an appropriate timing.

SUMMARY OF THE INVENTION

The present invention has been achieved in light of the above-describedcircumstances, and the present invention is to provide technique inwhich, in the case where a first radio communication unit has acquireddevice information, and a service has been started, it is possible todetect the stopping of the service by a second radio communication unit.

According to a first aspect of the present invention there is provided acommunication apparatus comprising a first acquisition unit thatacquires device information regarding another communication apparatusvia a first radio communication unit; and a detection unit that, when apredetermined service is being executed with the other communicationapparatus based on the device information acquired by the firstacquisition unit, detects a predetermined signal of the predeterminedservice via a second radio communication unit that is different from thefirst radio communication unit, wherein the communication apparatus isarranged to perform processing for stopping the predetermined service ifthe predetermined signal is detected by the detection unit.

According to a second aspect of the present invention there is provideda control method for a communication apparatus, the method comprising:acquiring device information regarding another communication apparatusvia a first radio communication unit; attempting to detect apredetermined signal of the predetermined service via a second radiocommunication unit that is different from the first radio communicationunit if a predetermined service is being executed with the othercommunication apparatus based on the acquired device information; andperforming processing for stopping the predetermined service if thepredetermined signal was detected.

According to embodiments of the present invention, in the case where afirst radio communication unit has acquired device information, and aservice has been started, it is possible to detect the stopping of theservice by a second radio communication unit, and to end the service atan appropriate timing.

Further features will become apparent from the following description ofexemplary embodiments with reference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a network configuration diagram according to an embodiment ofthe present invention.

FIG. 2 is a block diagram showing a configuration of a digital camera.

FIG. 3 is a block diagram showing a configuration of a smart device.

FIGS. 4A and 4B are flowcharts of device cooperation processing executedby the digital camera and the smart device according to an embodiment.

FIG. 5 is a flowchart of NFC communication processing executed by thedigital camera and the smart device.

FIG. 6 is a flowchart of service start processing executed by thedigital camera and the smart device.

FIG. 7 is a flowchart of high-speed connection processing executed bythe digital camera and the smart device.

FIG. 8 is a flowchart of device search processing executed by thedigital camera and the smart device.

FIG. 9 is a flowchart of service stop processing executed by the digitalcamera and the smart device.

FIG. 10 is a diagram showing an example of a device management tableused in the digital camera and the smart device.

FIGS. 11A and 11B are sequence diagrams showing a sequence from thestart of device cooperation between the digital camera and the smartdevice to service execution.

FIG. 12 is a sequence diagram showing a sequence for ending devicecooperation between the digital camera and the smart device.

FIG. 13 is a flowchart of normal connection processing executed by thedigital camera and the smart device according to a second embodiment.

FIGS. 14A and 14B are sequence diagrams showing a sequence from thestart of device cooperation between the digital camera and the smartdevice to service execution according to the second embodiment.

DESCRIPTION OF THE EMBODIMENTS

Hereinafter, embodiments will be described in detail with reference tothe accompanying drawings. Note that the technical scope of the presentinvention is defined by the claims, the individual embodiments describedbelow are merely examples, and the present invention is not intended tobe limited by these embodiments.

EMBODIMENTS

FIG. 1 is a configuration diagram of a system 100 of the embodiments.The system 100 is constituted by two devices, namely a digital camera101 and a smart device 102. In the embodiments, the digital camera 101and the smart device 102 both have hardware for performing NFC (NearField Communication) communication 103 and wireless LAN communication104, and can communicate with each other using this hardware.

FIG. 2 is a block diagram showing an example of the configuration of thedigital camera 101 of the embodiments. In this figure, a wireless LANcontrol unit 201 performs wireless LAN RF control, wireless LANcommunication processing, various types of control of wireless LANcommunication compliant with the IEEE 802.11 series, and protocolprocessing related to wireless LAN communication. An antenna 202performs wireless LAN communication. An NFC control unit 230 performsNFC RF control, NFC communication processing, various types of controlof NFC communication, and protocol processing related to NFCcommunication. An antenna 204 performs NFC communication. A control unit205 performs overall control of the digital camera 101 by executing acontrol program stored in a storage unit 206, and this control unit 205is constituted by a CPU as well as a ROM, a RAM, and the like. A storageunit 206 stores the control program executed by the control unit 205,and various types of information such as parameters necessary forcommunication. Various types of later-described operations are performedby the control unit 205 executing the control program stored in thestorage unit 206. An operation unit 207 is used for operating thedigital camera 101 and is constituted by a touch panel, various types ofswitches, buttons, and the like. A display unit 208 displays varioustypes of screens and has a function capable of outputting visuallyrecognizable information as with an LCD or an LED, or outputting audiofrom a speaker or the like. The reference 209 denotes a microphone. Apacket transmission/reception unit 210 transmits and receives packetsinvolved in various types of communication. An imaging unit 211 capturesan optical image of a subject. An image processing unit 212 convertscaptured images output from the imaging unit 211 into image data in apredetermined format, and performs various types of processing such asluminance and color correction on the image data. An encoding/decodingunit 213 performs predetermined high efficiency encoding (e.g., variablelength encoding after quantization or DCT) on image data output from theimage processing unit 212. A recording/playing unit 214 records thecompressed and encoded image data to a recording medium (e.g., aremovable memory card) that is not shown, and plays back recorded imagedata. A power supply unit 215 supplies power to the digital camera 101.

FIG. 3 is a block diagram showing an example of the configuration of thesmart device 102 of the embodiments. A smartphone is envisioned as thesmart device in the embodiments.

In this figure, a wireless LAN control unit 301 performs wireless LAN RFcontrol, wireless LAN communication processing, various types of controlof wireless LAN communication compliant with the IEEE 802.11 series, andprotocol processing related to wireless LAN communication. An antenna302 performs wireless LAN communication. A public radio control unit 303performs public radio communication RF control, public radiocommunication processing for performing public radio communication,various types of control of public radio communication, and protocolprocessing related to public radio communication. This public radiocommunication is compliant with the IMT (International MultimediaTelecommunications) standard, the LTE (Long Term Evolution) standard, orthe like. An antenna 304 performs public radio communication. An NFCcontrol unit 305 performs NFC RF control, NFC communication processing,various types of control of NFC communication, and protocol processingrelated to NFC communication. An antenna 306 performs NFC communication.A packet transmission/reception unit 307 transmits and receives packetsinvolved in various types of communication. A control unit 308 performsoverall control of the smart device 102 by executing a control programstored in a storage unit 309, and this control unit 308 is constitutedby a CPU as well as a ROM, a RAM, and the like. A storage unit 309stores the control program executed by the control unit 308, and varioustypes of information such as parameters necessary for communication.Various types of later-described operations are performed by the controlunit 308 executing the control program stored in the storage unit 309. Apower supply unit 310 supplies power to the smart device 102. A displayunit 311 displays various types of screens and has a function capable ofoutputting visually recognizable information as with an LCD or an LED,or outputting audio from a speaker or the like. An operation unit 312 isused for operating the smart device 102 and is constituted by a touchpanel, various types of switches, buttons, and the like. A calling unit313 enables a call to be made by a user and the reference 314 denotes amicrophone.

All of the function blocks have software or hardware relationships witheach other. Also, the above-described function blocks are merelyexamples, and multiple function blocks may constitute one functionblock, or any of the function blocks may be further divided into blocksfor performing respective functions. Note that the service provided bythe digital camera 101 described below refers to the transmission of acaptured image to a communication partner apparatus (the smart device102 in the embodiments), but it will be appreciated that this is merelyone example.

First Embodiment

The following describes device cooperation processing performed by thedigital camera 101 and the smart device 102 of a first embodiment withreference to FIGS. 4 to 12.

First, a device management table will be described with reference toFIG. 10. A device management table 1000 is a table in which informationnecessary for device cooperation is managed in association withrespective devices. Both the digital camera 101 and the smart device 102store the device management table although the stored content canpossibly be different.

The device management table 1000 can store information regardingmultiple devices. The information regarding each device has informationelements such as a device identifier 1001, an IP address 1002, a portnumber 1003, a model name 1004, a nickname 1005, a vendor name 1006, aservice type 1007, a service version 1008, extension functioninformation 1009, vendor extension information 1010, a deviceinformation acquisition URL 1011, and a registration state 1012. Thedevice identifier 1001 is an identifier that uniquely identifies thedevice, such as a UUID (Universally Unique Identifier). The IP address1002 and the port number 1003 are the IP address and the port number ofthe device for performing service execution. The model name 1004 isdevice type information, and is defined by an appropriate characterstring. The nickname 1005 is a simple name for allowing the user toidentify the device, and is defined by an appropriate character string.The vendor name 1006 is the name of the device distributor,manufacturer, or the like, and is defined by an appropriate characterstring. The service type 1007 is an identifier that uniquely identifiesthe service provided by the device. The service version 1008 is versioninformation regarding the service type 1007. The extension functioninformation 1009 is version information regarding extended services thatcan be provided besides the service indicated by the service type 1007.The vendor extension information 1010 is an appropriate character stringthat can be extended by the vendor. The device information acquisitionURL 1011 is URL information for acquiring the device information pieces1001 to 1010 via a wireless LAN. The registration state 1012 is theregistration state of the above device information. Examples of statesinclude the state where device information acquired via NFC (the firstradio communication unit) was manually registered, the state wheredevice information acquired via a wireless LAN (the second radiocommunication unit) was manually registered, and the state where deviceinformation was acquired via both NFC and a wireless LAN and thenregistered.

FIGS. 4A and 4B show the flow of operations when starting devicecooperation processing in the digital camera 101. In the presentembodiment, it is envisioned that device cooperation processing isexecuted using the detection of the proximity of the smart device 102 byNFC as the trigger, but there is no limit to this. For example, devicecooperation processing may be executed using the operation of a buttonof the digital camera 101 or the like as the trigger.

First, in step S401, the control unit 205 starts NFC communicationprocessing. The following describes NFC communication processing withreference to FIG. 5. In step S501, it is determined whether or not adata transmission request has been received from an external apparatus(the smart device 101 in this embodiment) by NFC communication. Theprocedure moves to step S503 if a data transmission request has beenreceived, and moves to step S502 if a data transmission request has notbeen received. In step S502, it is determined whether or not atransmission request reception timeout has occurred. If a timeout hasnot occurred, the procedure returns to step S501, whereas if a timeouthas occurred, the procedure moves to step S508, in which it isdetermined that NFC communication failed, and NFC communicationprocessing is ended. If the result of the determination in step S501indicates the reception of a data transmission request, the control unit205 performs data transmission by NFC communication in step S503, andthen the procedure moves to step S504. In the present embodiment, it isenvisioned that the data transmitted by NFC communication in the presentembodiment is application startup information, wireless LAN connectioninformation, device information, or the like, but there is no limitationto this. Note that the wireless LAN connection information includes anSSID (Service Set Identifier), a password, or the like. Also, theapplication startup information includes an application URI scheme,package name, or the like. In step S504, it is determined whether or notdata transmission by NFC communication was successful. If the datatransmission was successful, the procedure moves to step S505, whereasif the data transmission was not successful, the procedure moves to stepS508, in which it is determined that NFC communication failed, and NFCcommunication processing is ended. In step S505, the control unit 205performs data reception by NFC communication, and then the proceduremoves to step S506. In the present embodiment, the data received by NFCcommunication is wireless LAN connection information, deviceinformation, or the like, but there is no limitation to this. In stepS506, the control unit 205 determines whether or not data reception byNFC communication was successful. If the data reception was successful,the procedure moves to step S507, in which it is determined that NFCcommunication was successful, and then NFC communication processing isended, whereas if the data reception failed, the procedure moves to stepS508, in which it is determined that NFC communication failed, and NFCcommunication processing is ended. Note that the determinations ofwhether or not data transmission and data reception were successful instep S504 and step S506 are made based on the existence/absence of anNFC communication interruption caused by user separation of the digitalcamera 101 and the smart device 102, the existence/absence of data losscaused by a communication error, or the like, but there is no limitationto this. Also, in the present embodiment, the digital camera 101 waitsfor reception of a data transmission request before data transmissionand data reception are performed, but there is no limitation to this,and the smart device 102 may wait for reception of a data transmissionrequest. In this case, the digital camera 101 starts NFC communicationprocessing and then makes a data transmission request to the smartdevice 102.

The description will now return to the flowchart of FIG. 4A. When NFCcommunication processing in step S401 ends, the control unit 205 thenperforms service start processing in step S402. The following describesservice start processing with reference to FIG. 6. In step S601, thecontrol unit 205 controls the wireless LAN control unit 201 to start awireless LAN AP (Access Point) function, and then the procedure moves tostep S602. In step S602, the control unit 205 starts a DHCP serverfunction, and then the procedure moves to step S603. In step S603, thecontrol unit 205 starts a service execution server function, and thenthe procedure moves to step S604. In step S604, the control unit 205starts device announcement, and then the procedure moves to step S605.In step S605, the control unit 205 starts device searching, and thenends the service start processing. Note that it is envisioned that thedevice announcement and device searching are performed using SSDP, whichis a service discovery protocol. There is no limitation to this, andmDNS or the like make be used.

The description will now return to FIG. 4A. In step S403, the controlunit 205 determines whether or not device information has been acquiredby NFC communication (proximity acquisition determination). Theprocedure moves to step S404 if device information has been acquired,and moves to step S408 if device information could not be acquired. Notethat it is envisioned that the determination of whether or not deviceinformation has been acquired is made by determining whether or not NFCcommunication processing was successful, but there is no limitation tothis, and the determination may be made based on the validity of thedata in the acquired device information, for example. The followingdescription in the present embodiment is based on the assumption thatdevice information was acquired. In step S404, the control unit 205determines whether or not a service information acquisition request hasbeen received. The procedure moves to step S405 if a service informationacquisition request has been received, and moves to step S406 if aservice information acquisition request has not been received. In stepS405, the control unit 205 makes a response indicating that a connectingdestination is being selected, and then the procedure moves to stepS406. In step S406, it is determined whether or not an IP addressallocation response has been completed. The procedure moves to step S407if allocation has been completed, and returns to step S404 if allocationhas not been completed. In step S407, the control unit 205 performshigh-speed connection processing using the wireless LAN. Note that inthe present embodiment, device cooperation processing is unconditionallycontinued if device information acquisition failed, that is to say ifNFC communication processing failed, but a determination may be made asto whether or not processing is to be continued depending on the causeof the NFC communication processing failure. For example, processing iscontinued if an NFC communication interruption occurred, whereasprocessing is ended if data loss occurred due to a communication error.Also, the determination of whether or not NFC communication processingwas successful is performed after the execution of service startprocessing, but the determination may be made before the execution ofservice start processing. According to this configuration, if NFCcommunication fails and device cooperation processing is to be ended, itcan be immediately ended without executing unnecessary processing.

The following describes high-speed connection processing in step S407with reference to the flowchart of FIG. 7. In step S701, the controlunit 205 registers the device information acquired by NFC communicationin the device management table, and then the procedure moves to stepS702. At this time, the control unit 205 sets the registration state1012 in the device management table 1000 so as to indicate the state ofmanual registration by NFC. In step S702, the control unit 205determines whether or not connection processing is to be ended. Ifconnection processing is not to be ended, the procedure moves to stepS703, whereas if connection processing is to be ended, the proceduremoves to step S715, in which the control unit 205 determines that theconnection failed, and then ends the high-speed connection processing.Note that it is envisioned that the determination of whether or notconnection processing is to be ended is made based on whether or not acancel instruction has been given by a user operation, but there is nolimitation to this. For example, this determination may be made based onthe elapsed time since the start of connection processing, the number oftimes that a service information acquisition request has been made, orthe like. Accordingly, if the counterpart device cannot perform servicestart processing for a certain period of time due to waiting for theinput of information from the user or the like, it is possible to stopmaking unnecessary service information acquisition requests withoutneeding user awareness. Next, in step S703, the control unit 205determines whether or not a time period T1 has elapsed since theprevious service information acquisition request was made. The proceduremoves to step S704 if the time period T1 has elapsed, and moves to stepS709 if this time period has not elapsed. Note that it is envisionedthat the time period T1 is set to 100 ms in the present embodiment, butthere is no limitation to this, and this time period may be set to asmaller value. In this way, by setting the time period T1 to asufficiently small value if device information was acquired using NFCcommunication, it is possible to shorten the time required forconnection processing. In step S704, a service information acquisitionrequest is made, and then the procedure moves to step S705. In stepS705, the control unit 205 determines whether or not the serviceinformation acquisition request failed. The procedure moves to step S709if the service information acquisition request failed, and moves to stepS706 if the service information acquisition request did not fail. Instep S706, the control unit 205 determines whether or not the responseis a service information response. The procedure moves to step S708 ifthe response is a service information response, and moves to step S707if the response is not a service information response. In step S707, thecontrol unit 205 determines whether or not the response is a connectiondenial response. If the response is a connection denial response, theprocedure moves to step S715, in which it is determined that theconnection failure occurred, and high-speed connection processing isended, whereas if the response is not a connection denial response, theprocedure moves to step S709. In step S708, the control unit 205determines whether or not the service information response has beencompleted. If the response has been completed, the procedure moves tostep S713, in which it is determined that the connection was successful,and high-speed connection processing is ended, whereas if the responsehas not been completed, the procedure moves to step S709. In step S709,the control unit 205 determines whether or not a service informationacquisition request has been received. The procedure moves to step S710if a service information acquisition request has been received, andreturns to step S702 if a service information acquisition request hasnot been received. In step S710, the control unit 205 determines whetheror not the service information acquisition request originator matchesthe connecting destination. The procedure moves to step S711 if theymatch, and moves to step S714 if they do not match. Note that thedetermination of whether or not the request originator and theconnecting destination match is performed by comparing the deviceidentifier 1001 stored in the device management table 1000 with thedevice identifier of the acquisition request originator included in theservice information acquisition request, but there is no limitation tothis, and the determination may be made using the IP address or thelike. In step S711, the control unit 205 makes a service informationresponse, and then the procedure moves to step S712. In step S712, it isdetermined whether or not the acquisition of service information hasbeen completed. If the acquisition has been completed, the proceduremoves to step S713, in which it is determined that the connection wassuccessful, and high-speed connection processing is ended, whereas ifthe acquisition has not been completed, the procedure returns to stepS702. In step S714, the control unit 205 makes a connection denialresponse, and then the procedure moves to step S715. In step S715, it isdetermined that the connection failed, and then high-speed connectionprocessing is ended.

The description will now return to FIG. 4B. In step S413, the controlunit 205 determines whether or not connection processing was successful.The procedure moves to step S414 if connection processing wassuccessful, and moves to step S421 if connection processing was notsuccessful. In step S414, a service execution client function isstarted, and then the procedure moves to step S415. In step S415, thecontrol unit 205 determines whether or not device cooperation is to beended. The procedure moves to step S420 if device cooperation is to beended, and moves to step S416 if device cooperation is not to be ended.Note that the determination of whether or not device cooperation is tobe ended is made based on whether the user performed a button operationor power OFF operation, based on a disconnection request from the smartdevice 102, or the like, but there is no limitation to this. In stepS416, device search processing is performed.

The following describes device search processing in step S416 withreference to the flowchart in FIG. 8. In step S801, the control unit 205determines whether or not a device announcement message has beenreceived. The procedure moves to step S802 if a device announcementmessage has been received, and moves to step S808 if a deviceannouncement message has not been received. In step S802, the controlunit 205 determines whether or not the device announcement messageoriginator is a discovered device. The device search processing is endedif the device is a discovered device, whereas the procedure moves tostep S803 if the device is an undiscovered device. Note that thedetermination of whether or not the device is a discovered device isperformed by referencing the registration state 1012 in the devicemanagement table 1000. If the registration state is a state in whichdevice information has been acquired via the wireless LAN andregistered, the device is a discovered device, and if otherwise, thedevice is an undiscovered device. In step S803, the control unit 205performs device information acquisition, and then the procedure moves tostep S804. In step S804, the control unit 205 determines whether or notthe acquired device information is already registered in the devicemanagement table. The procedure moves to step S806 if the acquireddevice information is already registered, and moves to step S805 if theacquired device information is not registered. In step S805, the controlunit 205 registers the device information in the device managementtable, and then the procedure moves to step S807, in which it isdetermined that the device has been discovered, and device searchprocessing is ended. In step S806, the control unit 205 updates thedevice management table, and then the procedure moves to step S807, inwhich it is determined that the device has been discovered, and devicesearch processing is ended. Note that in the present embodiment, it isenvisioned that out of the pieces of data acquired using the wirelessLAN, the data that cannot be acquired by NFC communication is updated inthe device management table. One example of such data is the deviceinformation acquisition URL 1011. Note that there is no limitation tothis, and the data not included in the device information acquired byNFC communication may be overwritten with the data in the deviceinformation acquired using the wireless LAN. According to thisconfiguration, the data in the device information that could not be setat the start of NFC communication can be supplemented after connectionprocessing, and device cooperation processing can be started in advanceeven if some data necessary for device cooperation is not available. Instep S808, the control unit 205 determines whether or not a devicedisappearance message has been received. The procedure moves to stepS809 if a device disappearance message has been received, and devicesearch processing is ended if a device disappearance message has notbeen received. In step S809, the control unit 205 determines whether ornot the device disappearance message originator is a device for whichdevice discovery has been completed. This determination need only bemade by determining whether or not the device identifier indicating theoriginator in the device disappearance message matches a registereddevice identifier. The procedure moves to step S810 if the device thatis the device disappearance message originator is a discovered device,and device search processing is ended if it is an undiscovered device.In step S810, the control unit 205 deletes the corresponding device fromthe device management table, and then the procedure moves to step S811.In step S811, it is determined that the device has disappeared, anddevice search processing is ended.

The description will now return to FIG. 4B. In step S417, the controlunit 205 determines (confirms) whether or not the device hasdisappeared, that is to say, whether or not the device continues toexist. The procedure moves to step S420 if the device disappeared, andmoves to step S418 if the device has not disappeared. In step S418, thecontrol unit 205 determines whether or not a service execution requesthas been received. The procedure moves to step S419 if an executionrequest has been received, and moves to step S415 if an executionrequest has not been received. In step S419, the control unit 205performs service execution, and then the procedure returns to step S415.In step S420, the service execution client function is stopped, and thenthe procedure moves to step S421. In step S421, the control unit 205performs service stop processing, and then ends device cooperationprocessing.

The following describes service stop processing in step S421 withreference to the flowchart in FIG. 9. In step S901, the control unit 205stops the service execution server function, and then the proceduremoves to step S902. In step S902, the control unit 205 stops deviceannouncement, and then the procedure moves to step S903. Note that adevice disappearance message is transmitted when stopping deviceannouncement. In step S903, the control unit 205 stops device searching,and then the procedure moves to step S904. In step S904, the controlunit 205 stops the DHCP server function, and then the procedure moves tostep S905. In step S905, the control unit 205 stops the wireless LAN APfunction, and then ends the service stop processing.

Next, an example of the processing sequence from the start of devicecooperation between the digital camera 101 and the smart device 102 toservice execution in the first embodiment will be described withreference to FIGS. 11A and 11B.

The user brings the NFC communication units of the digital camera 101and the smart device 102 close to each other in order to start devicecooperation (M1101 and M1102). Upon detecting the proximity of the NFCcommunication units, the smart device 102 transmits a data acquisitionrequest by NFC communication (M1103), and then the digital camera 101performs data transmission by NFC communication (M1104). The smartdevice 102 receives the data, and then performs data transmission by NFCcommunication (M1105). The digital camera 101 receives the data by NFCcommunication, starts the wireless LAN AP function (M1106), and startsthe DHCP server function using the wireless LAN (M1107). When the DHCPserver function starts, the digital camera 101 performs service startprocessing (M1108), and then transmits a device announcement message andtransmits a device search message (M1109, M1110). The smart device 102receives the data by NFC communication, starts an application inaccordance with application startup information included in the receiveddata (M1111), and then starts the wireless LAN client function(including the DHCP client function) (M1112). Wireless LAN connectionprocessing is then performed between the digital camera 101 and thesmart device 102 (M1113). The smart device 102 then transmits an IPaddress acquisition request to the digital camera 101 (M1114). Thedigital camera 101 receives the IP address acquisition request,transmits an IP address allocation response to the smart device 102(M1115), and then starts high-speed connection processing (M1116). Uponstarting high-speed connection processing, the digital camera 101transmits a service information acquisition request to the IP addressallocated in the IP address allocation response (M1117). Note that inthe present embodiment, even if the service information acquisitionrequest (M1117) fails, it is not determined that connection processingfailed. Accordingly, connection processing can be continued even if thesmart device 102 could not properly receive an IP address allocationresponse, and IP address setting was delayed.

The smart device 102 receives the IP address allocation response,performs service start processing (M1118), and then transmits a deviceannouncement message and transmits a device search message (M1119,M1120). Upon starting service start processing, the smart device 102starts high-speed connection processing (M1121), and transmits a serviceinformation acquisition request to the IP address of the digital camera101 included in the service information acquired by NFC communication(M1122). The digital camera 101 receives the service informationacquisition request, and then transmits a service information response(M1123). After the time period T1 has elapsed since the previous serviceinformation acquisition request, the digital camera 101 re-transmits aservice information acquisition request to the smart device 102 (M1124).The smart device 102 receives the service information acquisitionrequest, transmits a service information response (M1125), anddetermines that the connection was successful (M1126). The digitalcamera 101 receives the service information response, and determinesthat the connection was successful (M1127). The digital camera 101receives the device announcement message transmitted by the smart device102 (M1128), and transmits a device information acquisition request tothe smart device 102 (M1129). The smart device 101 receives the deviceinformation acquisition request, and transmits a device informationresponse (M1130). The digital camera 101 receives the device informationresponse, and determines that the smart device 102 has been discovered(M1131). The smart device 102 receives the device announcement messagetransmitted by the digital camera 101 (M1132), and transmits a deviceinformation acquisition request to the digital camera 101 (M1133). Thedigital camera 101 receives the device information acquisition request,and transmits a device information response (M1134). The smart device102 receives the device information response, and determines that thedigital camera 101 has been discovered (M1135). The digital camera 101and the smart device 102 then perform service execution (M1136).

In the present embodiment, the digital camera 101 attempts to discoverthe smart device 102 after connection processing has been completed, butit may attempt to discover the smart device before connection processingis started. The same follows in the smart device 102 as well. In thiscase, the device information acquired using the wireless LAN isoverwritten with the device information acquired by NFC communication.According to this configuration, it is possible to eliminate anydiscrepancy in the device information to be used by the application.

In the present embodiment, the digital camera 101 starts the DHCP serverfunction and uses the first allocated IP address as the IP address ofthe smart device 102. According to this configuration, if the smartdevice 102 cannot statically set its own IP address, and the IP addressof the smart device 102 is not included in the device informationacquired by NFC communication, the digital camera 101 can determine theIP address of the smart device 102 that is the service informationacquisition request destination. On the other hand, if the IP address ofthe smart device 102 is included in the device information acquired byNFC communication, the digital camera 101 may transmit the serviceinformation acquisition request using that IP address. According to thisconfiguration, it is possible to start high-speed connection processingimmediately after the end of service start processing without using theDHCP server function, and it is possible to realize a further reductionin the amount of time required for connection.

Although the smart device 102 starts up an application due to NFCproximity detection in the present embodiment, the application may bestarted up in advance. In this case, M1111 is skipped, and the procedureis continued. According to this configuration, it is possible to startdevice cooperation processing without requiring the user to be aware ofwhether or not the application has been started up.

In the present embodiment, the digital camera 101 performs proximitydetection and starts device cooperation processing when the power is ON,but a configuration is possible in which proximity detection isperformed and device cooperation processing is started when the power isOFF. According to this configuration, device cooperation processing canbe started without requiring the user to be aware of the power state ofthe digital camera 101.

Next, an example of the processing sequence for ending devicecooperation between the digital camera 101 and the smart device 102 inthe present embodiment will be described with reference to FIG. 12.

The user performs an operation on the smart device 102 for ending devicecooperation (M1201). Note that the operation for ending devicecooperation is envisioned to be the pressing of a button, the move ofthe application to the background, the termination of the application,or the like, but there is no limitation to this. When this operation isperformed, the smart device 102 performs service stop processing(M1202), and then transmits a device disappearance message (or signal)(M1203). The digital camera 101 receives the device disappearancemessage from the smart device 102 (M1204), and then determines that thesmart device 102 disappeared (M1205). Note that although thisdetermination is made based on the device identifier in the presentembodiment, a configuration is possible in which if the IP address ofthe device disappearance message originator matches the IP addressallocated by the DHCP function, it is determined that the devicedisappearance message originator is the smart device 102 that is theservice provision destination. If the two do not match, the message isignored. The digital camera 101 and the smart device 102 performwireless LAN disconnection processing (M1206). When the wireless LANdisconnection processing has been completed, the smart device 102 stopsthe wireless LAN client function (M1207), and then ends devicecooperation (M1208). When the smart device 102 has disappeared, thedigital camera 101 performs service stop processing (M1209), and thentransmits a device disappearance message (M1210). When service stopprocessing has been completed, the digital camera 101 stops the DHCPserver function (M1211), stops the wireless LAN AP function (M1212), andthen ends device cooperation (M1213).

In the present embodiment, after device cooperation processing hasstarted, device cooperation processing is ended using a user operationas the trigger, but device cooperation processing may be automaticallyended according to the operating mode of the digital camera 101 or thelike when device cooperation processing is started. For example, ifdevice cooperation processing is started while the digital camera 101 isin a playback mode, device cooperation processing may be automaticallyended after transmitting, to the smart device 102, data indicating thatthe digital camera 101 is performing playback display. According to thisconfiguration, it is possible to transfer desired data by merelybringing devices close to each other, without requiring the user toperform troublesome operations, and additionally, the digital camera 101can be immediately returned to the state prior to device cooperation.

As described above, according to the present embodiment, in acommunication apparatus having a proximity radio unit that performs NFCcommunication or the like and a radio communication unit that has afaster communication speed and longer communication distance than theproximity radio unit, even if device information is acquired usingproximity radio communication, and device cooperation is started, it ispossible to quickly and precisely detect (wirelessly detect) thedisappearance of the counterpart device by radio communication. As aresult, it is possible to shorten the time required for connection indevice cooperation processing, and also end service execution at anappropriate timing.

Note that although one of the two devices is a digital camera, and theother is a smart device in the present embodiment, this is merely oneexample. The present invention is applicable between a digital cameraand a printer, a digital camera and a storage device (image storingdevice), and a storage device and a printer as well, and there are nolimitations on the type of device.

Second Embodiment

The first embodiment describes device cooperation processing between thedigital camera 101 and the smart device 102 in the case where deviceinformation can be acquired using NFC communication. The followingdescribes, as the second embodiment, device cooperation processing inthe case where device information could not be acquired by NFCcommunication, with reference to FIGS. 4, 13, and 14.

The processing from step S401 to step S403 in FIG. 4A is similar to thatin the first embodiment, and therefore will not be described here. Instep S408, it is determined whether or not a service informationacquisition request has been received. The procedure moves to step S409if a service information acquisition request has been received, andmoves to step S410 if a service information acquisition request has notbeen received. In step S409, a response is made indicating that aconnecting destination is being selected, and then the procedure movesto step S410. In step S410, device search processing is performed, andthen the procedure moves to step S411. In step S411, it is determinedwhether or not a device has been discovered. The procedure moves to stepS412 if a device has been discovered, and returns to step S408 if adevice has not been discovered. In step S412, normal connectionprocessing is performed.

The following describes normal connection processing in step S412 withreference to the flowchart in FIG. 13. In step S1301, it is determinedwhether or not connection processing is to be ended, where if it is tobe ended, the procedure moves to step S1307, in which it is determinedthat the connection failed, and normal connection processing is ended,whereas if connection processing is not to be ended, the procedure movesto step S1302. Note that in the second embodiment, the determination ofwhether or not connection processing is to be ended is not made usingthe amount of time that has elapsed since the start of connectionprocessing, the number of times a service information acquisitionrequest has been made, or the like, but rather is made based on a canceloperation performed by the user. Accordingly, device cooperationprocessing can be continued even in the case where a long time isrequired to discover a counterpart device in the device searching on thewireless LAN. In step S1302, it is determined whether or not a timeperiod T2 has elapsed since the previous service information acquisitionrequest was made. The procedure moves to step S1303 if the time periodT2 has elapsed, and moves to step S1309 if it has not elapsed. In stepS1303, a service information acquisition request is made, and then theprocedure moves to step S1304. In step S1304, it is determined whetheror not the service information acquisition request failed. If theservice information acquisition request failed, the procedure moves tostep S1307, in which it is determined that the connection failed, andnormal connection processing is ended, whereas if the serviceinformation acquisition request did not fail, the procedure moves tostep S1305. In the case where connection processing is executed uponwirelessly acquiring device information using the wireless LAN, when theacquisition of the device information has been completed, it is obviousthat that device has completed service start processing, and thereforeit is determined that connection processing failed if the serviceinformation acquisition request failed. In step S1305, it is determinedwhether or not the response is a service information acquisitionresponse, where the procedure moves to step S1308 if the response is aservice information acquisition response, and moves to step S1306 if theresponse is not a service information acquisition response. In stepS1306, it is determined whether or not the response is a connectiondenial response, where if the response is a connection denial response,the procedure moves to step S1307, in which it is determined that theconnection failed, and normal connection processing is ended, whereas ifthe response is not a connection denial response, the procedure moves tostep S1309. In step S1308, it is determined whether or not the serviceinformation response has been completed. If the response has beencompleted, the procedure moves to step S1314, in which it is determinedthat the connection was successful, and normal connection processing isended, whereas if the response has not been completed, the proceduremoves to step S1309. In step S1309, it is determined whether or not aservice information acquisition request has been received, where theprocedure moves to step S1310 if a service information acquisitionrequest has been received, and returns to step S1301 if a serviceinformation acquisition request has not been received. In step S1310, itis determined whether or not the service information acquisition requestoriginator matches the connecting destination. The procedure moves tostep S1311 if they match, and moves to step S1314 if they do not match.Note that the determination of whether or not the request originator andthe connecting destination match is performed by comparing the deviceidentifier 1001 registered in the device management table 1000 with thedevice identifier of the acquisition request originator included in theservice information acquisition request, but there is no limitation tothis. In step S1311, a connection denial response is made, and then theprocedure returns to step S1301. In step S1312, a service informationresponse is made, and then the procedure moves to step S1313. In stepS1313, it is determined whether or not the acquisition of serviceinformation has been completed. If the acquisition has been completed,the procedure moves to step S1314, in which it is determined that theconnection was successful, and normal connection processing is ended,whereas if the acquisition has not been completed, the procedure returnsto step S1301.

Next, an example of the processing sequence from the start of devicecooperation between the digital camera 101 and the smart device 102 toservice execution in the second embodiment will be described withreference to FIGS. 14A and 14B.

The processing from M1401 to M1415 is the same as the processing fromM1101 to M1115 described in the first embodiment, and therefore will notbe described here. Upon receiving the IP address allocation response,the smart device 102 performs service start processing (M1416), and thentransmits a device announcement message and transmits a device searchmessage (M1417, M1418). The digital camera 101 receives the deviceannouncement message transmitted by the smart device 102 (M1419), andtransmits a device information acquisition request to the smart device102 (M1420). The smart device 102 receives the device informationacquisition request, and then transmits a device information response tothe digital camera 101 (M1421). The digital camera 101 receives thedevice information response, determines that the smart device 102 hasbeen discovered (M1422), and then starts normal connection processing(M1423). Upon starting normal connection processing, the digital camera101 transmits a service information acquisition request to the IPaddress included in the device information acquired using the wirelessLAN (M1424). The smart device 102 receives the service informationacquisition request, and since normal connection processing has not beenstarted yet, then transmits a response indicating that the connectingdestination is being selected to the digital camera 101 (M1425). Thesmart device 102 receives the device announcement message transmitted bythe digital camera 101 (M1426), and transmits a device informationacquisition request to the digital camera 101 (M1427). The digitalcamera 101 receives the device information acquisition request, andtransmits a device information response (M1428). The smart device 102receives the device information response, determines that the digitalcamera 101 has been discovered (M1429), and then starts normalconnection processing (M1430). Upon starting normal connectionprocessing, the smart device 102 transmits a service informationacquisition request to the digital camera 101 (M1431). The digitalcamera 101 receives the service information acquisition request andtransmits a service information response (M1432). After the time periodT2 has elapsed since the previous service information acquisitionrequest, the digital camera 101 re-transmits a service informationacquisition request to the smart device 102 (M1433). The smart device102 receives the service information acquisition request, transmits aservice information response (M1434), and determines that the connectionwas successful (M1435). The digital camera 101 receives the serviceinformation response, and determines that the connection was successful(M1436). The digital camera 101 and the smart device 102 then performservice execution (M1437).

In the second embodiment, it is envisioned that the time period T2 isset to a larger value than the time period T1. This is because devicediscovery using a wireless LAN generally takes several seconds to ten ormore seconds, and therefore if the service information acquisitionrequest is transmitted at a short time interval, the number ofre-transmissions will increase, and the processing load will increase.In this way, by setting an appropriate time period in the case wheredevice information cannot be acquired by NFC communication, it ispossible to avoid an unnecessary increase in the processing load.

As described above, according to the second embodiment, even if a devicein the possession of the user is a device that does not have an NFCcommunication function, or an error occurs in NFC communication, devicecooperation can be performed without requiring the user to be aware ofsuch situations.

Note that in the above embodiments, the digital camera 101 starts thewireless LAN AP function and the DHCP server function, and the smartdevice 102 joins the network by starting the wireless LAN clientfunction, but there is no limitation to this. For example, the smartdevice 102 may start the wireless LAN AP function and the DHCP serverfunction, and the digital camera 101 may join the network by startingthe wireless LAN client function. Also, although the network connectionbetween the digital camera 101 and the smart device 102 is a one-on-oneconnection, connection via an external AP is possible.

Although NFC is used in the proximity communication unit that transmitsand receives device information in the above embodiments, the presentinvention is not limited to this. Bluetooth (registered trademark),IrDA, or the like may be used.

Although the case where the present invention is applied to an IEEE802.11-compliant wireless LAN is described in the above embodiments,there is no limitation to this. For example, the present invention maybe carried out over another radio medium, such as wireless USB, MBOA,Bluetooth (registered trademark), UWB, or ZigBee. Also, the presentinvention may be carried out over a wired communication medium such as awired LAN.

Here, MBOA is an abbreviation for Multi Band OFDM Alliance. Also, UWBincludes wireless USB, wireless 1394, WINET, and the like.

Other Embodiments

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2014-048075, filed Mar. 11, 2014 which is hereby incorporated byreference herein in its entirety.

1.-11. (canceled)
 12. A communication apparatus comprising: a firstradio communication unit that communicates with another communicationapparatus; a first transmitting unit that transmits device informationregarding the communication apparatus via the first radio communicationunit; a second radio communication unit that communicates with the othercommunication apparatus, using a different radio communication systemfrom that of the first radio communication unit; and a secondtransmitting unit that, when the other communication apparatus isexecuting a predetermined service with the communication apparatus basedon the device information transmitted by the first transmitting unit,transmits via the second radio communication unit a predetermined signalwhich stops executing of the predetermined service and includes thedevice information regarding the communication apparatus; wherein theother communication apparatus (i) if the device information, included inthe predetermined signal, regarding the communication apparatus isincluded in the device information which has been transmitted by thefirst transmitting unit, stops processing of the predetermined service,and (ii) if the device information, included in the predeterminedsignal, regarding the communication apparatus is not included in thedevice information which has been transmitted by the first transmittingunit, does not stop the processing of the predetermined service.
 13. Thecommunication apparatus according to claim 12, wherein the second radiocommunication unit is operable to perform wireless communication with afaster communication speed and longer communication distance than thewireless communication from the first radio communication unit.
 14. Thecommunication apparatus according to claim 12, wherein the deviceinformation includes at least one of an identifier, an IP address, aport number, a model name, a nickname, a vendor name, a service type, aservice version, extension function information, and vendor extensioninformation of the other communication apparatus.
 15. The communicationapparatus according to claim 12, further comprising: a thirdtransmitting unit that transmits via the second radio communication unita signal including the device information regarding the communicationapparatus periodically.
 16. The communication apparatus according toclaim 15, wherein the third transmitting unit transmits the signalincluding the device information regarding the communication apparatusin response to receiving a request from the other communicationapparatus.
 17. The communication apparatus according to claim 12,wherein the first radio communication unit is arranged to performcommunication compliant with NFC (Near Field Communication), and thesecond radio communication unit is arranged to perform communicationcompliant with IEEE 802.11 series.
 18. The communication apparatusaccording to claim 12, wherein the communication apparatus is a smartdevice and the other communication apparatus is a digital camera.
 19. Acontrol method for a communication apparatus, the method comprising:communicating by a first radio communication unit with anothercommunication apparatus; transmitting device information regarding thecommunication apparatus via the first radio communication unit;communicating by a second radio communication unit with the othercommunication apparatus, using a different radio communication systemfrom that of the first radio communication unit; and transmitting viathe second radio communication unit, when the other communicationapparatus is executing a predetermined service with the communicationapparatus based on the device information transmitted by the firsttransmitting unit, a predetermined signal which stops executing of thepredetermined service and includes the device information regarding thecommunication apparatus; wherein the other communication apparatusperforms an execution that, (i) if the device information, included inthe predetermined signal, regarding the communication apparatus isincluded in the device information which has been transmitted by thefirst transmitting unit, stops processing of the predetermined service,and (ii) if the device information, included in the predeterminedsignal, regarding the communication apparatus is not included in thedevice information which has been transmitted by the first transmittingunit, does not stop the processing of the predetermined service.
 20. Anon-transitory computer-readable storage medium storing a computerprogram which, when read and executed by a computer, causes the computerto execute a method comprising: communicating by a first radiocommunication unit with another communication apparatus; transmittingdevice information regarding the communication apparatus via the firstradio communication unit; communicating by a second radio communicationunit with the other communication apparatus, using a different radiocommunication system from that of the first radio communication unit;and transmitting via the second radio communication unit, when the othercommunication apparatus is executing a predetermined service with thecommunication apparatus based on the device information transmitted bythe first transmitting unit, a predetermined signal which stopsexecuting of the predetermined service and includes the deviceinformation regarding the communication apparatus; wherein the othercommunication apparatus performs an execution that, (i) if the deviceinformation, included in the predetermined signal, regarding thecommunication apparatus is included in the device information which hasbeen transmitted by the first transmitting unit, stops processing of thepredetermined service, and (ii) if the device information, included inthe predetermined signal, regarding the communication apparatus is notincluded in the device information which has been transmitted by thefirst transmitting unit, does not stop the processing of thepredetermined service.